﻿//using Model;
using System.Data;
using System.Data.SqlClient;

namespace DataAccess
{
    public class DonViDA : DBConnection
    {
        public DonViDA()
        {
            sqlCommand.Connection = sqlConnection;
        }

        public DataTable LoadDataDonVi()
        {
            DataTable dt = new DataTable();
            string query = "select * from DONVI";
            open();
            sqlCommand = new SqlCommand(query,sqlConnection);
            SqlDataAdapter adapter = new SqlDataAdapter();
            adapter.SelectCommand = sqlCommand;
            adapter.Fill(dt);
            close();
            return dt;
        }
    }
}
